# dependency: GNU wget (busybox wget cannot work); imagicmagick for mogrify  
wget -O index_hnol_rss.htm http://bbs.voc.com.cn/rss.php?fid=50
cat index_hnol_rss.htm | grep link | grep topic > links_hnol_rss.htm
sed -i -e "s/<link>//g" links_hnol_rss.htm 
sed -i -e "s/<\/link>//g" links_hnol_rss.htm 
sed -i -e "s/\ *//g" links_hnol_rss.htm
sed -i -e "s/topic/archiver\/tid/g" links_hnol_rss.htm 
sed -i -e "s/-[0-9]-[0-9]//g" links_hnol_rss.htm

#temporary limit to 30 titles
cat links_hnol_rss.htm | head -30 > links_hnol_rss_30title.htm
wget -nd -r -Dimage.hnol.net,bbs.voc.com.cn -l1 -A jpg -H -i links_hnol_rss_30title.htm 
mogrify -resize 640x480 *.jpg
